#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

/**
 * Definition for singly-linked list.
 */
struct ListNode {
	int val;
	struct ListNode* next;
};

typedef struct ListNode listNode, *listnode;

struct ListNode* deleteNode(struct ListNode* head, int val);

int main()
{
	return 0;
}

struct ListNode* deleteNode(struct ListNode* head, int val)
{
	if (!head) return NULL;
	if (head->val == val) return head->next;

	listnode p = head;
	while (p->next && p->next->val != val) p = p->next;
	p->next = p->next->next;

	return head;
}
